<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
    
    <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
    <%@ taglib prefix="pg" uri="http://jsptags.com/tags/navigation/pager" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Insert title here</title>

</head>
<body>
<!-- 分页  -->
	<% 
		String url = request.getParameter("url");
		int total = Integer.parseInt(request.getParameter("items"));
	%>
	<ul class="pager">
		<pg:pager  url="<%=url  %>"  items="<%=total  %>"  maxPageItems="5"  maxIndexPages="15" export="currentPageNumber=pageNumber">
			<pg:first>   
				<li><a href="${pageUrl }">首页</a>   </li>
			</pg:first>
			<pg:prev>   
				<li><a href="${pageUrl }">上一页</a>   </li>
			</pg:prev> 
			<pg:pages> 
				<c:choose> 
					<c:when test="${currentPageNumber eq pageNumber}">   
						<font color="red">${pageNumber }</font>  
					</c:when>   
					<c:otherwise>   
						<li><a href="${pageUrl }">${pageNumber }</a>  </li> 
					</c:otherwise> 
				</c:choose>
			</pg:pages>
			<pg:next>   
				<li><a href="${pageUrl }">下一页</a>   </li>
			</pg:next> 
			<pg:last>   
				<li><a href="${pageUrl }">尾页</a>   </li>
			</pg:last> 
		</pg:pager> 
	</ul>
</body>
</html>